<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // let sum = (num1,num2) => num1+num2;
        // console.log(sum(2,3))

        let sum = (num1) => (num2) => num1 + num2
        console.log(sum(2)(3))

        let arr = [10,5,11,7,8,9];

        function valFun(arr){
            //最大值 - 最小值
            return Math.max.apply(null,arr) - Math.min.apply(null,arr)
        }
        console.log(valFun(arr));
    </script>
</body>
</html>